home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Archives / ARexxTools / fpl70.lha / src / COMPILING < prev    next >
Encoding:
Text File  |  1994-03-15  |  8.5 KB  |  175 lines

  1. /************************************************************************
  2.  *                                                                      *
  3.  * fpl.library - A shared library interpreting script langauge.         *
  4.  * Copyright (C) 1992-1994 FrexxWare                                    *
  5.  * Author: Daniel Stenberg                                              *
  6.  *                                                                      *
  7.  * This program is free software; you may redistribute for non          *
  8.  * commercial purposes only. Commercial programs must have a written    *
  9.  * permission from the author to use FPL. FPL is *NOT* public domain!   *
  10.  * Any provided source code is only for reference and for assurance     *
  11.  * that users should be able to compile FPL on any operating system     *
  12.  * he/she wants to use it in!                                           *
  13.  *                                                                      *
  14.  * You may not change, resource, patch files or in any way reverse      *
  15.  * engineer anything in the FPL package.                                *
  16.  *                                                                      *
  17.  * This program is distributed in the hope that it will be useful,      *
  18.  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
  19.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                 *
  20.  *                                                                      *
  21.  * Daniel Stenberg                                                      *
  22.  * Ankdammsgatan 36, 4tr                                                *
  23.  * S-171 43 Solna                                                       *
  24.  * Sweden                                                               *
  25.  *                                                                      *
  26.  * FidoNet 2:201/328    email:dast@sth.frontec.se                       *
  27.  *                                                                      *
  28.  ************************************************************************/
  29.  
  30. COMPILING
  31. =========
  32.  
  33.  All versions:
  34.  -------------
  35.    FPL has been developed on Amiga and under AIX (IBM's UNIX version) using
  36.  SAS/C development system version 6 and the internal AIX `cc' compiler combined
  37.  with the `xcdb' debugger.
  38.  
  39.    The FPL source code is highly portable. Source code packages I've received
  40.  during my life with programming, have often turned out to be hard to compile,
  41.  contained innumerous errors and the only conclusion you do is that the
  42.  distributed source code is not the same one that created the executable. This
  43.  is *NOT* a source code package like that. FPL is written in ANSI C and the
  44.  source code distributed is the only source used when FPL was compiled. Using
  45.  SAS/C on Amiga and the standard `cc' (or perhaps `gcc') under UNIX will
  46.  compile error free! Use 'ANSI' option with any other compiler to achieve best
  47.  possible result!
  48.  
  49.    If you add or change anything major when porting, please send a copy of that
  50.  to me to apply in the original FPL package.
  51.  
  52.    All versions are easily tested. Try running `SFPL demo.FPL' and if that
  53.  works, you know that _most_ of FPL is working.
  54.  
  55.    Using the `DEBUG' define activates a lot of extra checking and debugging
  56.  possibilities. Combined with the MEMORY_COOKIE define in "script.h", a good
  57.  piece of memory writing checks is performed. The `MEMORY_QUEUE' enbles the
  58.  memory queuing system.
  59.  
  60.    FPL runs and depends a lot on eight bit characters. Other character sets is
  61.  easily supported by changing the defines in "script.h", but modifying it to
  62.  other than eight bit characters will give you hard and boring work!
  63.  
  64.    Compilers not supporting ANSI C will have a hard time compiling this!
  65.  
  66.  Amiga version:
  67.  --------------
  68.    Assign FPL: to the FPL directory before compiling.
  69.  
  70.    You can make two version of the fpl.library, or more specificly one
  71.  library version and one standard executable file version.
  72.  
  73.  The development of this started using SAS/C v5.10 and since that lacked proper
  74.  library debugging features, I inserted some `#ifdef's and `#define's in the
  75.  source so that I could create both a library version and a version done as
  76.  a common executable for debugging. As you can see in the Makefile, the
  77.  define `SHARED' constructs the library.  Just a 'make' will create the
  78.  library, while a 'make FPL' will create the executable.
  79.  
  80.    The library version is using low level assembler routines for stack
  81.  allocating/expanding/swapping (coded by Kjell Ericson/Daniel Stenberg).
  82.  
  83.    Some people have experienced troubles when trying to compile this. I can't
  84.  understand why, but am searching for the answer.
  85.  
  86.    Compiling the executable file version will visualize a warning 205
  87.  (`macro may have side effects' or something like that), but don't bother,
  88.  the macro it warns about is perfectly safe.
  89.  
  90.    Compiling generates warning 183 `inlined function declared but not used',
  91.  ignore it!
  92.  
  93.    __inline has been used in a few places to make the `Global Optimizer' inline
  94.  those functions in the code.
  95.  
  96.  In the file "script.c", I do two calls to the function InitStack() and
  97.  EndStack(). These are the two assembler functions that take care of the stack
  98.  swapping. Make absolutely sure the stack pointer isn't changed in any way
  99.  between those two function calls. The second function has been fixed to use
  100.  A0 and D0 as parameter registers just to force SAS/C *not* to preserve any
  101.  registers just before the function invoke.
  102.  
  103.    If you're trying to compile this without the SAS/C compiler, you will hit
  104.  some troubles, but nothing that shouldn't be able to overcome!
  105.  
  106.  UNIX versions:
  107.  --------------
  108.    I spent many hours on this project writing the program under UNIX. The
  109.  source features a small number of `#ifdef's to make this possible.
  110.  The UNIX version I use is AIX, which is a mix of BSD and SVR4, OSF/1
  111.  builts heavily upon it. The code is easily ported into other UNIX
  112.  environments. The UNIX version can also be compiled into a shared library! I
  113.  just don't know if it will work with anything but AIX, or not, but do try!
  114.  'make' will create the shared library 'libfpl.a' (in good old UNIX naming
  115.  standard) while 'make FPL' will build the executable version.
  116.  
  117.    I added (940314) the file 'Makefile.SVR4' which should compile FPL into a
  118.  shared library (libfpl.so) under any SVR4 UNIX!
  119.  
  120.    (I ported FPL to SunOS v4.1.1 and Dell Unix v2.2. The SUN `cc' compiler
  121.  promptly refuses some things (like the Data structure members which are
  122.  function pointers, DaSt's note), so I used the GNU `gcc' compiler instead.
  123.  The Dell Unix (SVR4) works like a charm, but will give a silly little warning
  124.  for the '\a'. You can safely ignore it. / BjSt)
  125.  
  126.    Compiling FPL v6.0 under SunOS 4.1.X did result in segmentation fault.
  127.  Define VARARG_FUNCTIONS for SunOS compilings!
  128.  
  129.  OS/2 version:
  130.  -------------
  131.    Since the 12th of February 1994, I include makefile.os2 and "FPL.def" file
  132.  in the FPL package to enable compiling FPL into a DLL (shared library) under
  133.  OS/2. The IBM C-Set/2 compiler does complain a *LOT* on using bitwise
  134.  operators on signed integers, but what can I do? I want bitwise operators on
  135.  signed integers!!
  136.  
  137.  DOS version:
  138.  ------------
  139.    I actually thought of making one. Then I tried Turbo C and discovered that
  140.  it doesn't look upon a single byte 10 as a newline character. That, plus the
  141.  fact that DOS compilers too often think in terms of 16-bit made me skip all
  142.  further efforts. Later modifications of FPL such as turning `int' into `long'
  143.  throughout the entire source code has enhanced DOS porting possibilities, but
  144.  is there really anyone who can do anything _serious_ with MS-DOS?!?.
  145.  
  146.  New versions:
  147.  -------------
  148.    Use `#ifdef's extensively and do not modify any part of the source code
  149.  that do not affect the system you're fixing it to run under.
  150.  
  151. MAKEFILE
  152. ========
  153.  
  154.    This package's 'makefile' comes with the AIX options not commented.
  155.  'smakefile' is the Amiga SAS/C makefile. To compile under another OS, comment
  156.  the AIX lines in 'makefile' and uncomment the proper lines. Add other
  157.  makefile stuff by commenting current uncommented lines and add your own.
  158.  
  159. SOURCE CODES
  160. ============
  161.  
  162.    The source has been coded with great thought of program performance. It's
  163.  not easy to understand but I have done my best adding comments all over the
  164.  place.
  165.  
  166. INCLUDE FILES
  167. =============
  168.  
  169.    The "FPL.h" is in two places in the archive, but that is because of the
  170.  convinience of having it in the source directory and I really couldn't
  171.  leave it out of the include directory tree!
  172.    When using the Amiga version you have to copy the files from the include
  173.  directory to INCLUDE:. If you're using any other system, those files won't be
  174.  needed.
  175.